package com.swust.exam.service;



import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.swust.exam.dao.CourseMapper;
import com.swust.exam.pojo.Course;
import com.swust.exam.pojo.Exam;

@Service
public class CourseService {
	@Autowired
	private CourseMapper courseMapper;
	
	public Course get(int id) {
		return courseMapper.selectByPrimaryKey(id);
		
	}
	
	public int delete(int id) {
		return courseMapper.deleteByPrimaryKey(id);
	}
	
	public int insert(Course course) {
		return courseMapper.insert(course);
	}
	
	public int update(Course course) {
		return courseMapper.updateByPrimaryKey(course);
	}
	
	public List<Course>courselist(){
		return courseMapper.courseList();
		
	}
	

}
